#ifndef __COMPONENT_ANTI_CHEAT_BASE_H__
#define __COMPONENT_ANTI_CHEAT_BASE_H__

#include "Components/ComponentAntiCheat.h"

using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
    struct ComponentPlayer;

    class SubsystemTimeOfDay;
    class SubsystemTerrain;

    class AuthPlugin;

    struct ComponentAntiCheatBase : public ComponentAntiCheat
    {
        bool isTriggerCheat;
        uint32_t flyDetectionFactory;
        float lastVelocityY;

        SubsystemTimeOfDay *timeOfDay;
        SubsystemTerrain *terrain;
        AuthPlugin *authPlugin;


        virtual void update(float dt) override;
		virtual const std::string &getName() const override;
        static const std::string &GetName();
        virtual void load(const nlohmann::json &jsonData) override;


        inline void addCheatCount(uint8_t count);
    };

    inline void ComponentAntiCheatBase::addCheatCount(uint8_t count)
    {
        isTriggerCheat = true;
        numberOfAnomalies += count;
    }
    
}

#endif